package com.softeem.mpdemo.controller;

import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.softeem.mpdemo.dto.Result;
import com.softeem.mpdemo.entity.User;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name="用户接口",description = "对于用户相关功能接口，如：注册，登录，信息更新，查看，删除等操作")
@RestController
public class UserController {

    @Operation(summary = "用户登录",description = "需要提供账号和登录密码")
    @Parameters({
            @Parameter(name = "username",description = "用户名",required = true),
            @Parameter(name = "password",description = "密码",required = true)
    })
    @GetMapping("/user/login")
    public Result login(String username,String password){
        //todo 具体实现待完成
        return null;
    }

    @Operation(summary = "用户注册")
    @PostMapping("/user/reg")
    public Result reg(@Parameter(description = "用户对象") User user){
        //todo 具体实现待完成
        return null;
    }

}
